﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConList.aspx.cs" Inherits="Web.frontpage.SignUp.right.ConList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../../ajaxJqueryPager/pagination.css" rel="stylesheet" type="text/css" />
    <script src="../../../ajaxJqueryPager/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../../ajaxJqueryPager/jquery.pagination.js" type="text/javascript"></script>
    <link href="../../css/SignUp.css" rel="stylesheet" type="text/css" />
    <script src="../../js/ConList.js" type="text/javascript"></script>
    <script type="text/javascript">
       function InitData(pageindx)
        {
            var tbody = "";
            var SelectList = "CON_NAME,CON_STARTTIME,CON_ENDTIME,CON_TEACHERS,ACA_NAME,COM_FORM,CON_ID";
            var tableName = "v_Contest";
            var SearchCondition=" CON_IsShow='2'";
            $.ajax({
               type: "POST",//用POST方式传输
               dataType:"json",//数据格式:JSON
               url:'../../../page.ashx',//目标地址
               data:"p="+(pageindx+1)+"&orderby="+orderby+"&SelectList="+SelectList+"&tableName="+tableName+"&SearchCondition="+SearchCondition, 
               beforeSend:function(){$("#divload").show();$("#Pagination").hide();},//发送数据之前,显示loading gif,隐藏数据
               complete:function(){$("#divload").hide();$("#Pagination").show()},//接收数据完毕
               success:function(json) {
                        $("#productTable tr:gt(0)").remove();
                        var productData = json.tempTable;
                        $.each(productData, function(i, n) {
                            var trs = "";
                            trs += "<tr><td>" + n.CON_NAME + "</td><td>" + n.CON_STARTTIME + "</td><td>" + n.CON_ENDTIME + "</td><td>"+n.CON_TEACHERS+"</td><td>"+n.ACA_NAME+"</td><td>" +check(n.COM_FORM,"1","小组报名"," 个人报名")+ "</td><td><a href='ShowCon.aspx?conId="+n.CON_ID+"'><img src=\"../../images/SignUp/icon/detail.gif\" alt=\"详细信息\" title=\"详细信息\" /></a>&nbsp;&nbsp;<a href='javascript:;' onclick=\"SignUp('"+n.COM_FORM+"','"+n.CON_ID+"')\"><img src=\"../../images/SignUp/icon/setup.png\" alt=\"我要报名\" title=\"我要报名\"  /></a></td></tr>";
                            tbody += trs;
                        });

                        $("#productTable").append(tbody);

                        $("#productTable tr:gt(0):odd").attr("class", "odd");
                        $("#productTable tr:gt(0):even").attr("class", "enen");
                        
                        
                        $("#productTable tr:gt(0)").hover(function(){
                            $(this).addClass('mouseover');
                        },function(){
                            $(this).removeClass('mouseover');
                        });
                }});
                //分页控制
                $("#Pagination").pagination(<%=pagecount %>, {
                    callback: pageselectCallback,
                    prev_text: '« Previous',
                    next_text: 'Next »',
                    items_per_page:5,//每页数据条数
		            num_display_entries:6,//省略号前显示几页
		            current_page:pageindx,//当前第几页
		            num_edge_entries:2//省略号后显示几页
                });
            
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divload" style="top: 50%; right: 50%; position: absolute; padding: 0px;
        margin: 0px; z-index: 999">
        <img src="../../images/loding.gif"  alt=""/>
    </div>
    <div id="divSpecial" class="box" style="top: 20%; right: 40%; position: absolute; padding: 0px;margin: 0px; z-index: 999">
        <div class="top">
           <span>是否专业组</span>
        </div>
        <div class="content" style="padding-bottom:5px;">
            <center>
                <input type="radio" value="1" name="Special" id="RdSpecial" /><label>专业组</label>
                <input type="radio" value="0" name ="Special" id="RdUnSPecial"/><label>非专业组</label>
            </center>
        </div>
        <div class="foot">
            <center>
                <input type="button" class="btn" onclick="SignUpSubmit();" value="确定" />
                <input type="button" class="btn" onclick="javascript:$('#divSpecial').hide();" value="取消" />
            </center>
        </div>
    </div>
    <div id="contentWrap">
	    <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">
                <div style="float:left">
                    可报竞赛列表
                </div>
                <div style=" float:right; margin-right:5px; text-align: right;">
                    分页样式:
                    <select id="pageTheme">
                        <option value="digg">digg</option>
                        <option value="meneame">meneame</option>
                        <option value="flickr">flickr</option>
                        <option value="sabrosus">sabrosus</option>
                        <option value="scott">scott</option>
                        <option value="black">black</option>
                        <option value="black2">black2</option>
                        <option value="black-red">black-red</option>
                        <option value="grayr">grayr</option>
                        <option value="yellow">yellow</option>
                        <option value="jogger">jogger</option>
                        <option value="starcraft2">starcraft2</option>
                        <option value="tres">tres</option>
                        <option value="megas512">megas512</option>
                        <option value="technorati">technorati</option>
                        <option value="youtube">youtube</option>
                        <option value="msdn">msdn</option>
                        <option value="badoo">badoo</option>
                        <option value="manu">manu</option>
                        <option value="viciao">viciao</option>
                        <option value="green-black">green-black</option>
                        <option value="yahoo2">yahoo2</option>
                    </select>
                </div>
            </div>
            <div class="pageColumn">
                <table cellpadding="5" cellspacing="1" width="620" id="productTable" align="center">
                    <tr>
                        <th style="width: 10%">
                            <a style="cursor: pointer;" onclick="Sort('CON_NAME','CON_NAME');return false;">竞赛名称</a><span
                                id="CON_NAME" class="ordertip"></span>
                        </th>
                        <th style="width: 10%">
                            <a style="cursor: pointer;" onclick="Sort('COM_NAME','COM_NAME');return false;">
                                开始时间
                            </a><span id="COM_NAME" class="ordertip"></span>
                        </th>
                        <th style="width: 10%">
                            <a style="cursor: pointer;" onclick="Sort('CON_YEAR','CON_YEAR');return false;">结束时间</a><span
                                id="CON_YEAR" class="ordertip"></span>
                        </th>
                        <th style="width: 5%">
                            <a style="cursor: pointer;" onclick="Sort('CON_TEACHERS','CON_TEACHERS');return false;">指导教师</a><span
                                id="Span1" class="ordertip"></span>
                        </th>
                        <th style="width: 8%">
                            <a style="cursor: pointer;" onclick="Sort('ACA_NAME','ACA_NAME');return false;">所属学院</a>
                            <span id="ACA_NAME" class="ordertip"></span>
                        </th>
                        <th style="width: 5%">
                            <a style="cursor: pointer;" onclick="Sort('COM_FORM','COM_FORM');return false;">
                                报名方式</a><span id="COM_FORM" class="ordertip"></span>
                        </th>
                        <th  style="width:5%;">
                            <a style="cursor: pointer;" >
                                操作</a><span id="Span2" class="ordertip"></span>
                        </th>
                    </tr>
                </table>
            </div>
            <div id="Pagination" class="digg">
            </div>
        </div><!-- #widget -->
    </div>
    </form>
</body>
</html>
